#include "DropManager.h"
#include"ServerMaster.h"
#include"GameServer.h"
#include"ItemController.h"
#include"controller/ResourceController.h"

DropManager::DropManager(Object* master)
{
	m_master = master;
}

DropManager::~DropManager()
{
}

void DropManager::drop(const int& userId,const int& type, const int& value, const int& size)
{
	auto master = dynamic_cast<ServerMaster*>(m_master);
	switch (type)
	{
	case 1:
		master->getModule<ItemController>()->addItem(userId, value, size);
		break;
	case 2:
		break;
	case 3:
		break;
	case 4:
		break;
	case 5:
		master->getModule<ResourceController>()->addRes(userId, value, size);
		break;
	default:
		break;
	}
}
